<template>
  <el-card class="router-box-card">
    <div slot="header" class="clearfix">
      <span class="card-title">消息设置</span>
      <el-button style="float: right; padding: 3px 0" type="text">清空所有消息</el-button>
    </div>
    <div class="card-content">
      <div class="item-setting" v-for="(item,index) in setting" :key="index">
        <div class="setting-info">
          <div>
            <span>{{item.title}}</span>
          </div>
          <div class="setting-desc">
            <span>{{item.desc}}</span>
          </div>
        </div>
        <div class="switch">
          <el-switch
            v-model="item.value"
            active-color="#13ce66"
            inactive-color="#ff4949">
          </el-switch>
        </div>
      </div>
    </div>
  </el-card>
</template>

<script>
export default {
  name: 'index',
  data(){
    return{
      setting:[
        {
          title: '评论和@消息提示设置',
          desc: '有人对我内容进行评论时，我会收到消息提醒',
          value: false
        },
        {
          title: '系统通知',
          desc: '接收到系统通知时，我会收到消息提醒',
          value: true
        }
      ]
    }
  }
}
</script>

<style scoped>
.router-box-card{
  padding: 10px;
}

.card-title{
  font-size: 16px;
  font-weight: 600;
  color: #222226;
}
/*设置*/
.item-setting{
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid #f0f0f2;
}

.setting-desc{
  font-size: 14px;
  color: #999;
  padding: 10px 0;
}
</style>
